package com.demo.gulimall.auth.entity;

import java.util.Date;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import java.io.Serializable;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

/**
 * 积分变化历史记录
 *
 * @author Chen Yuan
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("ums_integration_change_history")
public class IntegrationChangeHistory implements Serializable {
	/** id */
	@TableId(type = IdType.ID_WORKER) // 老版本
    //@TableId(type = IdType.ASSIGN_ID) // 新版本
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`id`")
	private Long id;

	/** member_id */
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`member_id`")
	private Long memberId;

	/** create_time */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="Asia/Shanghai")
	@TableField(value = "`create_time`")
	private Date createTime;

	/** 变化的值 */
	@TableField(value = "`change_count`")
	private Integer changeCount;

	/** 备注 */
	@TableField(value = "`note`")
	private String note;

	/** 来源[0->购物；1->管理员修改;2->活动] */
	@TableField(value = "`source_tyoe`")
	private Byte sourceTyoe;

}
